
//类的使用
class Student{
    //成员变量:定义在类的内部，方法的外部
    public String name;
    public int age;
    public Student(){
        System.out.println("没有参数的构造方法");
    }
    public Student(String name,int age){
        this.name = name;
        this.age = age;
        System.out.println("名字是："+name + "年龄为："+ age);
    }

}

public class test_1010 {
    public static void main(String[] args) {
        //Student student= new Student();
        Student student= new Student("lisi",45);
        Student student1=new Student("zhangsan",33);
    }
}
